package com.quanyan.stadium.utils.demo.SpringDemo.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * Created by xiaoxiao on 17/1/18.
 */
@Component
public class DemoPublish {
    @Autowired
    ApplicationContext context;

    public void pushMsg(String msg) {
        context.publishEvent(new DemoEvent(this, msg));
    }
}
